package com.wande.dataplatform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wande.dataplatform.domain.AssetTagRelation;
import com.wande.dataplatform.domain.dto.TagStatisticsDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 资产标签关联Mapper
 *
 * @author wande
 */
public interface AssetTagRelationMapper extends BaseMapper<AssetTagRelation> {

    /**
     * 查询资产的标签列表
     */
    List<Long> selectTagIdsByAsset(@Param("assetId") Long assetId, @Param("assetType") String assetType);

    /**
     * 批量删除资产标签关联
     */
    int deleteByAsset(@Param("assetId") Long assetId, @Param("assetType") String assetType);

    /**
     * 查询标签统计信息
     */
    List<TagStatisticsDTO> selectTagStatistics(@Param("tenantId") Long tenantId);
}
